import java.rmi.*;
import java.rmi.server.*;
import java.text.*;
import java.util.*;

public class date_provider extends UnicastRemoteObject implements date_service {
	
	public date_provider() throws RemoteException {
		super();
	}
	
	public String date(String s1) {
		s1 = s1.trim();
		if(s1.equals("")) s1 = "EEE, d MMM yyyy HH:mm:ss";
		DateFormat df = new SimpleDateFormat(s1);
		return df.format(new Date(System.currentTimeMillis()));
	}
}
